package book.dao.impl;

import book.dao.OrderItemDao;
import book.pojo.OrderItem;

/**
 * @BelongsProject: JavaWeb
 * @BelongsPackage: book.dao.impl
 * @Author: LiYing
 * @CreateTime: 2020-12-27 18:02
 * @Description:
 */
public class OrderItemDaoImpl extends BaseDao implements OrderItemDao {
    @Override
    public int saveOrderItem(OrderItem orderItem) {

        String sql = "insert into t_order_item(`name`,`count`,`price`,`total_price`,`order_id`) values(?,?,?,?,?)";
        return update(sql,orderItem.getName(),orderItem.getCount(),orderItem.getPrice(),orderItem.getTotalPrice(),orderItem.getOrderId());
    }

    }
